package com.neusoft.bizcore.auth.dto;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.dto.AbstractAuditDTO;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class AuthUserCreateUpdateDTO extends AbstractAuditDTO {

    private static final long serialVersionUID = 1L;

    /** 用户名 */
    @NotBlank(message = "用户名不能为空")
    @Length(max = 50, message = "用户名不能超过{max}位")
    private String username;

    /** 密码 */
    @NotBlank(message = "密码不能为空")
    @Length(max = 255, message = "密码不能超过{max}位")
    private String password;

    /** 姓名 */
    @Length(max = 50, message = "姓名不能超过{max}位")
    private String name;

    /** 邮件 */
    @Length(max = 50, message = "邮件不能超过{max}位")
    private String mail;

    /** 电话 */
    @Length(max = 50, message = "电话不能超过{max}位")
    private String phone;

    /** 锁定标志 */
    private boolean locked = false;

    /** 可用标志 */
    private boolean enabled = false;

    private List<String> oganizations = new ArrayList<>();

    private List<String> roles = new ArrayList<>();

    private List<String> permissions = new ArrayList<>();

}
